package com.zzyl.mapper;

import com.zzyl.dto.ResourceDto;
import com.zzyl.entity.Resource;
import com.zzyl.vo.ResourceVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface ResourceMapper {

    List<ResourceVo> list(Resource resource);

    void updateResource(ResourceDto resourceDto);

    @Select("select * from sys_resource where resource_no = #{parentResourceNo}")
    Resource getResource(String parentResourceNo);

    void insert(Resource resource);

    void deleteResource(String resourceNo);

    //查询子资源最大编号
    String getSonResour(String parentResourceNo);

//    查询父资源号查询父亲状态
    ResourceVo getParent(@Param("resourceNo") String resourceNo);

    void resourceEnable(@Param(value = "dataState") String dataState, @Param(value = "enable") String enable);

}















